package com.ruoyi.web.controller.tool;

import java.net.URLDecoder;

public class Test {

    public static void main(String[] args) {
        String url="https://angchengpz.oss-cn-hangzhou.aliyuncs.com/%E8%BF%98%E6%AC%BE%E5%87%AD%E8%AF%81/2/3271/%E9%98%BF%E9%87%8C%E4%BA%91%E5%8F%91%E7%A5%A8.pdf?Expires=1763570250&OSSAccessKeyId=LTAI5tRiDxVyFfr3gucUbxCa&Signature=UIWO7qTHsF2B8CTnTK28cHnGIig%3D,https://angchengpz.oss-cn-hangzhou.aliyuncs.com/%E8%BF%98%E6%AC%BE%E5%87%AD%E8%AF%81/2/3271/%E4%B8%80%E7%BA%A7%E5%BB%BA%E9%80%A0%E5%B8%88%E8%AF%81%E4%B9%A6.pdf?Expires=1763570281&OSSAccessKeyId=LTAI5tRiDxVyFfr3gucUbxCa&Signature=pb60b3hONFMQvg%2FuBwWxDSxrikQ%3D";
        url=url.split(";")[0];
        url=URLDecoder.decode(url);
        url=url.split("\\?")[0];
        System.out.println(url);
        int index=url.lastIndexOf("/")+1;
        String fileName=url.substring(index,url.length());

        System.out.println(fileName);
    }
}
